﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using XYTXL.AppCode;
using XYTXL.API;
using XYTXL.Data;
using System.IO;

namespace XYTXL.View
{
    public partial class BranchManger : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }

        protected void btQuery_Click(object sender, EventArgs e)
        {
            BindData();
        }

        private void BindData()
        {
            DataTable dt = new DataTable();
            dt = new JH_Auth_UserB().GetEntities(d => d.UserName != "admin").ToList().ToDataTable();
            RepRepeaterData.DataSource = dt;
            RepRepeaterData.DataBind();
        }

        public string GetBranchName(string strBranchCode)
        {
            return new JH_Auth_BranchB().GetBranchNameByCode(int.Parse(strBranchCode));
        }
    }
}